package org.example.gof.proxy.util;

import org.example.gof.proxy.dynamic.TimeInvocationHandler;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Proxy;

/**
 * org.example.gof.proxy.util
 *
 * @author 莫磊
 * @description
 * @date 2025/7/28
 */
public class ProxyUtil {

	public static Object getProxy (Object target, InvocationHandler handler) {
		return Proxy.newProxyInstance(target.getClass().getClassLoader(),
				target.getClass().getInterfaces(),
				handler);
	}

}
